package com.demo.controllers;

import com.demo.database.data.TDemoPosition;
import com.demo.database.mapper.TDemoPositionMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import xianchenglock.T;

import java.util.List;

/**
 * @功能
 * @创建时间 2019/12/28
 * 控制器测试
 */
@Controller
public class PositionController {

    @Autowired
    private TDemoPositionMapper positionMapper;
    @RequestMapping("querry")
    @ResponseBody
    public List<TDemoPosition> qquerry(TDemoPosition position) throws Exception {

        List<TDemoPosition> list=positionMapper.querry(position);
        System.out.println(list);
        System.out.println(position.getUserId());
        return list;
    }
    @RequestMapping("add")
    @ResponseBody
    public String add(TDemoPosition position) throws Exception {
        positionMapper.add(position);
        return "false";
    }
}
